package com.atguigu.gmall.user.client;

import com.atguigu.gmall.user.client.impl.UserDegradeFeignClient;
import com.atguigu.gmall.user.model.UserAddress;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * title:
 * author: Gyh
 * date:2023-05-06 16:40
 * Description:
 */
@FeignClient(value = "service-user",fallback = UserDegradeFeignClient.class,path = "/api/user")
public interface UserFeignClient {

    /**
     * 获取用户地址
     * @param userId
     * @return
     */
    @GetMapping("/inner/findUserAddressListByUserId/{userId}")
    public List<UserAddress> getUserAddressListByUserId(@PathVariable("userId") Long userId);
}
